package xyz.haijin.zt.core.exception;

/**
 * 基础业务异常
 * @author liuhaijin
 * @date 2022/4/18
 */
public abstract class BaseException extends RuntimeException {
    protected String errorMessage;

    public BaseException(String message, Throwable cause) {
        super(cause);
        this.errorMessage = message;
    }

    /**
     * 异常码
     * @return
     */
    public abstract int errorCode();

    public String errorMessage() {
        return this.errorMessage;
    }
}
